<?php
namespace app\api\validate;

use think\Validate;

class GiftValidate extends Validate
{
    protected $rule =   [
        'id'                 => 'require|number',
        'gift_id|礼品包ID'   => 'require|number',
        'admin_id|店铺'      => 'require|number',
        'curr|页数'          => 'require|number',
        'limit|条数'         => 'require|number',
        'name|名称'          => 'require|length:1,30',
        'price|价格'         => 'require',
        'type|类型'          => 'require|number',
        'small_img|缩略图'   => 'require|image',
    ];
    
    protected $scene = [
        'show'     => ['gift_id'],
        'list'     => ['admin_id', 'curr', 'limit'],
    ];
}